<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title><?php echo CHtml::encode($this->pageTitle); ?></title>

        <link href="<?php echo Yii::app()->theme->baseUrl; ?>/views/layouts/css/main.css" rel="stylesheet" type="text/css" />
        <!--<link href='http://fonts.googleapis.com/css?family=Cuprum' rel='stylesheet' type='text/css' />-->

        <?php
//        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/jquery-1.4.4.js");
        Yii::app()->clientScript->registerCoreScript('jquery');
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/spinner/jquery.mousewheel.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/spinner/ui.spinner.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/jquery-ui-1.8.11.min.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/fileManager/elfinder.min.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/wysiwyg/jquery.wysiwyg.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/wysiwyg/wysiwyg.image.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/wysiwyg/wysiwyg.link.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/wysiwyg/wysiwyg.table.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/flot/jquery.flot.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/flot/jquery.flot.pie.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/flot/excanvas.min.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/dataTables/jquery.dataTables.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/dataTables/colResizable.min.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/forms/forms.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/forms/autogrowtextarea.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/forms/autotab.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/forms/jquery.validationEngine-en.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/forms/jquery.validationEngine.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/colorPicker/colorpicker.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/uploader/plupload.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/uploader/plupload.html5.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/uploader/plupload.html4.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/uploader/jquery.plupload.queue.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/ui/progress.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/ui/jquery.jgrowl.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/ui/jquery.tipsy.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/ui/jquery.alerts.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/jBreadCrumb.1.1.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/cal.min.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/jquery.collapsible.min.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/jquery.ToTop.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/jquery.listnav.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/jquery.sourcerer.js");
        Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/custom.js");

        //addition for multi-select plugin
//Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/views/layouts/js/jquery.multiselect.js");
        ?>

<!--        <link href="<?php //echo Yii::app()->theme->baseUrl;   ?>/views/layouts/css/jquery.multiselect.css" rel="stylesheet" type="text/css" />
<link href="<?php //echo Yii::app()->theme->baseUrl;   ?>/views/layouts/css/style.css" rel="stylesheet" type="text/css" />
<link href="<?php //echo Yii::app()->theme->baseUrl;   ?>/views/layouts/css/jquery-ui.css" rel="stylesheet" type="text/css" />-->
    </head>

    <body>
        <!-- Top navigation bar -->
        <div id="topNav">
            <div class="fixed">
                <div class="wrapper">
                    <div class="welcome">
                        <?php
                        echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/../uploads/users/" . User::model()->findByPk(Yii::app()->user->id)->avatarUrl, '', array('width' => '22', 'height' => '20')), array('user/view', 'id' => Yii::app()->user->id));
                        ?>
                        <span>Welcome, <?php echo Yii::app()->user->name; ?></span>
                    </div>
                    <div class="userNav">
                        <ul>
                            <li><a href="#" title=""><img src="<?php echo Yii::app()->theme->baseUrl; ?>/views/layouts/images/icons/topnav/profile.png" alt="" /><span>Profile</span></a></li>
                            <li><a href="#" title=""><img src="<?php echo Yii::app()->theme->baseUrl; ?>/views/layouts/images/icons/topnav/tasks.png" alt="" /><span>Tasks</span></a></li>
                            <li><a href="#" title=""><img src="<?php echo Yii::app()->theme->baseUrl; ?>/views/layouts/images/icons/topnav/settings.png" alt="" /><span>Settings</span></a></li>
                            <li>
                                <!--                                <a href="login.html" title="">
                                                                    <img src="<?php echo Yii::app()->theme->baseUrl; ?>/views/layouts/images/icons/topnav/logout.png" alt="" /><span>Logout</span>
                                                                </a>-->
                                <?php
                                $img = CHtml::image(Yii::app()->theme->baseUrl . '/views/layouts/images/icons/topnav/logout.png');
                                echo CHtml::link($img . '<span>Logout</span>', array("site/logout"));
                                ?>
                            </li>
                        </ul>
                    </div>
                    <div class="fix"></div>
                </div>
            </div>
        </div>


        <div class="wrapper">
            <div class="errorPage">
                <?php
                echo $content;
                ?>
            </div>
        </div>

        <!-- Footer -->
        <div id="footer">
            <div class="wrapper">
                <span>&copy; Copyright 2011. All rights reserved. It's Brain admin theme by <a href="#" title="">Eugene Kopyov</a></span>
            </div>
        </div>

    </body>
</html>
